<HTML><HEAD><TITLE>library(lists)</TITLE></HEAD><BODY>
[ <A HREF="../../index.html">Reference Manual</A> | <A HREF="../../fullindex.html">Alphabetic Index</A> ]<H1>library(lists)</H1>
Predicates for list manipulation
<H2>Predicates</H2>
<BLOCKQUOTE>
<DL>
<DT><A HREF="append-3.html"><STRONG>append(?List1, ?List2, ?List3)</STRONG></A></DT>
<DD>Succeeds if List3 is the result of appending List2 to List1.

</DD>
<DT><A HREF="checklist-2.html"><STRONG>checklist(+Pred, +List)</STRONG></A></DT>
<DD>Succeeds if Pred(Elem) succeeds for every element of List.

</DD>
<DT><A HREF="collection_to_list-2.html"><STRONG>collection_to_list(+Collection, ?List)</STRONG></A></DT>
<DD>Convert a "collection" into a list</DD>
<DT><A HREF="delete-3.html"><STRONG>delete(?Element, ?List1, ?List2)</STRONG></A></DT>
<DD>Succeeds if List2 is List1 less an occurence of Element in List1.

</DD>
<DT><A HREF="flatten-2.html"><STRONG>flatten(+NestedList, ?FlatList)</STRONG></A></DT>
<DD>Succeeds if FlatList is the list of all elements in NestedList, as found in
a left-to-right, depth-first traversal of NestedList.

</DD>
<DT><A HREF="flatten-3.html"><STRONG>flatten(++MaxDepth, +NestedList, ?FlatList)</STRONG></A></DT>
<DD>Depth-limited list flattening</DD>
<DT><A HREF="halve-3.html"><STRONG>halve(+List, ?Front, ?Back)</STRONG></A></DT>
<DD>Split a list in the middle</DD>
<DT><A HREF="intersection-3.html"><STRONG>intersection(+List1, +List2, ?Common)</STRONG></A></DT>
<DD>Succeeds if Common unifies with the list which contains the common elements
of List1 and List2.

</DD>
<DT><A HREF="length-2.html"><STRONG>length(?List, ?N)</STRONG></A></DT>
<DD>Succeeds if the length of list List is N.

</DD>
<DT><A HREF="maplist-3.html"><STRONG>maplist(+Pred, ?OldList, ?NewList)</STRONG></A></DT>
<DD>Succeeds if Pred(Old, New) succeeds for corresponding pairs of elements
from OldList and NewList.

</DD>
<DT><A HREF="member-2.html"><STRONG>member(?Term, ?List)</STRONG></A></DT>
<DD>Succeeds if Term unifies with a member of the list List.

</DD>
<DT><A HREF="memberchk-2.html"><STRONG>memberchk(+Term, ?List)</STRONG></A></DT>
<DD>Succeeds if Term is a member of the list List.

</DD>
<DT><A HREF="nonmember-2.html"><STRONG>nonmember(+Element, +List)</STRONG></A></DT>
<DD>Succeeds if Element is not an element of the list List.

</DD>
<DT><A HREF="print_list-1.html"><STRONG>print_list(+List)</STRONG></A></DT>
<DD>Print the elements of a list, one per line</DD>
<DT><A HREF="reverse-2.html"><STRONG>reverse(+List, ?Reversed)</STRONG></A></DT>
<DD>Succeeds if Reversed is the reversed list List.

</DD>
<DT><A HREF="shuffle-2.html"><STRONG>shuffle(+List, ?ShuffledList)</STRONG></A></DT>
<DD>Shuffle a list, ie randomize the element order</DD>
<DT><A HREF="splice-3.html"><STRONG>splice(?Odds, ?Evens, ?List)</STRONG></A></DT>
<DD>Merge two lists by interleaving the elements</DD>
<DT><A HREF="subset-2.html"><STRONG>subset(?SubList, +List)</STRONG></A></DT>
<DD>Succeeds if List is the list which contains all elements from SubList in
the same order as in SubList.

</DD>
<DT><A HREF="subtract-3.html"><STRONG>subtract(+List1, +List2, ?Remainder)</STRONG></A></DT>
<DD>Succeeds if Remainder is the list which contains those elements of List1
which are not in List2.

</DD>
<DT><A HREF="union-3.html"><STRONG>union(+List1, +List2, ?Union)</STRONG></A></DT>
<DD>Succeeds if Union is the list which contains the union of elements in List1
and those in List2.

</DD>
</DL>
</BLOCKQUOTE>
<H2>Reexports</H2>
<BLOCKQUOTE><DL>
</DL></BLOCKQUOTE>
<H2>Description</H2>
<p>
    Library containing various simple list manipulation predicates which
    require no special form of lists. For ordered lists see library(ordset).
    A number of basic list processing predicates (is_list/1, append/3,
    member/2, length/2 etc) are available by default and do not require
    this library to be loaded.
</p><p>
    Note that in the predicate descriptions for this library, the '+' mode
    in the mode specification for list-valued arguments indicates that the
    list argument is required to be a proper list in the sense of is_list/1,
    i.e. all list tails must be recursively instantiated.
</p>

<H2>About</H2><UL COMPACT>
<LI><STRONG>Copyright &copy; </STRONG>Cisco Systems, Inc
<LI><STRONG>Date: </STRONG>$Date: 2009/02/19 05:38:37 $
</UL>
<HR>Generated from lists.eci on 2009-05-27 01:25
</BODY></HTML>
